Ext.namespace("com.test.cmp");
com.test.cmp.UserMngPanel=Ext.extend(Ext.Panel,{
	border:false,
	layout:'border',
	initComponent: function(config){
		this.items=[
			{
				xtype:'usertree',
				region:'west',
				width:220,
				split:true,
				collapsible:true,
				listeners:{
					"click":function(node,e){
						var dataGrid=Ext.getCmp("userDataGrid");
						dataGrid.removeAllData();
						if(node.text.indexOf("黑木崖")!=-1){
							dataGrid.loadData('../data/usermng/userData1.json');
						}else if(node.text.indexOf("开发区")!=-1){
							dataGrid.loadData('../data/usermng/userData2.json');
						}
					}
				}
			},
			{
				xtype:'usergrid',
				id:'userDataGrid',
				region:'center'
			}
		];
		com.test.cmp.UserMngPanel.superclass.initComponent.call(this);   
	}
});
Ext.reg("usermngpanel",com.test.cmp.UserMngPanel);
